Mediation Considerations

BHET Meeting

Sam Harper

McGill University

2023-12-21

HEI study objectives


Aim 1.

Estimate the total effect of the intervention.

Aim 2.

Estimate the contribution of changes in the chemical composition of PM_{2.5} to the overall effect on health outcomes.

Aim 3. 👈

Examine alternative pathways and mechanisms that may contribute to the intervention’s impact.

Basic idea for mediation study

To understand the pathways, mechanisms, and intermediates through which a treatment affects an outcome.


How much of the policy effect is through:

  • Reduced exposure to PM_{2.5}
  • Other pathways (behavioral changes?)
  • Also consider multiple mediators

First part of mediation: total effect



Step 1: Estimate the total effect of T.



Second part of mediation: decomposition

Basic idea: understand pathways of effects


Step 2: Estimate how much of the total effect is due to PM_{2.5} vs. other pathways?


Basic DAG for Mediation


X = pre-treatment covariates

T = exposure

M = mediator

W = confounders

Y = outcome

Basic DAG for Mediation


X = pre-treatment covariates

T = exposure

M = mediator

W = confounders

Y = outcome

Quantities of interest

Total effect: \color{red}{E[Y|T,X]=\beta_{0}+\beta_{1}T +\beta_{2}X}

This equation estimates the total effect of the ban: \color{red}{TE=\beta_{1}(T^{*}-T)} where T^{*} is exposure to ban and T is no exposure.

Mediation model

Estimate two regressions:1 {E[M|T,X]=\beta_{0}+\beta_{1}T +\beta_{2}X} \color{red}E[Y|T,X,M] = \theta_{0} + \theta_{1}T + \theta_{2}M + \theta_{3}TM + \theta_{4}X + \theta_{5}W

Second equation estimates the “Controlled Direct Effect”: \color{red}{CDE=\theta_{1}+\theta_{3}TM}

Key assumptions


Assumptions for valid CDE:

  • No confounding of the total effect.
  • No confounding of the mediator-outcome effect.

Valid NDE and NIE also require:

  • No confounding of the exposure-mediator effect.
  • No mediator–outcome confounder affected by treatment.

What the hell is the CDE?


Interpretation

This effect is the contrast between the counterfactual outcome if the individual were exposed at T=t and the counterfactual outcome if the same individual were exposed at T=t*, with the mediator set to a fixed level M=m.


English:

“By how much would blood pressure change if the policy were implemented and we held PM_{2.5} fixed at m ?“

Ex: Respiratory symptoms, Sleep


X = cohort, time FEs

T = policy

M = hours of sleep

W = {empty}

Y = Poor respiratory symptoms

‘Poor respiratory symptoms’ = 1 if frequency of any coughing, wheezing, etc. were “most” or “several” days a week.

Data

  • 3 waves, complete data on outcome and mediator
Unique (#) Missing (%) Mean SD Min Median Max
v_id 50 0 25.3 14.2 1.0 25.0 50.0
year 3 0 2019.4 1.2 2018.0 2019.0 2021.0
cohort_year 4 0 2018.6 0.9 2018.0 2018.0 2021.0
treat 2 0 0.2 0.4 0.0 0.0 1.0
resp 2 0 0.5 0.5 0.0 1.0 1.0
hsleep 30 0 7.7 2.0 1.0 8.0 20.0

Total Effect

logit(Y_{it}) = \alpha^{village}_{v[i]} + \sum_{r=q}^{T} \beta_{r} d_{r} + \sum_{s=r}^{T} \gamma_{s} fs_{t}+ \sum_{r=q}^{T} \sum_{s=r}^{T} \tau_{rt} (d_{r} \times fs_{t})

  • \alpha^{village}_{v[i]} = village-level random intercept
  • d_{r} = treatment cohort fixed effects
  • fs_{t} = time fixed effects
  • \tau_{rt} = cohort-time ATTs1

Marginal effects

Cohort-specific ATTs

Simple Average
Est. (S.E. )  2.5 %  97.5 %
Avg ATT −0.106 (0.051) −0.203 −0.003
Cohort Averages
Est. (S.E. )  2.5 %  97.5 %
ATT(g2019) −0.158 (0.067) −0.284 −0.023
ATT(g2020) 0.013 (0.075) −0.137 0.158
ATT(g2021) −0.017 (0.111) −0.241 0.194

Mediation model

logit(Y_{it}) = \alpha^{village}_{v[i]} + \sum_{r=q}^{T} \beta_{r} d_{r} + \sum_{s=r}^{T} \gamma_{s} fs_{t}+ \sum_{r=q}^{T} \sum_{s=r}^{T} \tau_{rt} (d_{r} \times fs_{t}) \\ + \delta M_{it} + \sum_{r=q}^{T} \sum_{s=r}^{T} \eta_{rt} (d_{r} \times fs_{t} \times M_{it}) where now we have added:

  • \delta = conditional effect of mediator
  • \eta_{rt} = treatment-mediator product terms

Estimates

Total Effect
CDE
Est.  2.5 %  97.5 % Est.  2.5 %  97.5 %
Untreated 0.606 0.514 0.690 0.599 0.505 0.688
Treated 0.498 0.444 0.553 0.500 0.447 0.554
Difference −0.106 −0.203 −0.003 −0.098 −0.202 0.008


  • Minimal evidence of mediation.

  • Proportion explained: PE = \frac{TE - CDE}{TE} = 0.08

Extensions to multiple mediators


  • More complicated

  • Sequential mediators?

  • Interactions between mediators?

Summary

  • Mediation analysis aims are part of HEI project.

  • Likely to focus mostly on CDEs.

  • Tutorials, packages and macros in R, SAS, Stata available.1

  • Recent R package regmedint from Yoshida and Li (2022)

  • Implementation with staggered DiD more likely to require manual implementation rather than ‘default’ R packages.

References

Arel-Bundock V. Marginaleffects: Predictions, comparisons, slopes, marginal means, and hypothesis tests [Internet]. 2023. Available from: https://marginaleffects.com/
Bürkner PC. Brms: An R package for bayesian multilevel models using Stan. Journal of statistical software. 2017;80:1–28.
VanderWeele T. Explanation in causal inference: Methods for mediation and interaction. Oxford University Press; 2015.
Yoshida K, Li Y. Regmedint: Regression-based causal mediation analysis with interaction and effect modification terms [Internet]. 2022. Available from: https://kaz-yos.github.io/regmedint/